package com.hingsmy.pma.dao;

import com.hingsmy.pma.dto.Chartdata;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.hingsmy.pma.entities.Project;
import java.util.List;

public interface ProjectRepository  extends CrudRepository<Project, Long> {


    @Override
    public List<Project> findAll();

    @Query(nativeQuery = true, value="SELECT stage AS label, COUNT(*) AS value FROM project GROUP BY stage")


 List<Chartdata>getProjectStatus();
}
